import './assets/main.css'
// import 'lib-flexible'
// import 'amfe-flexible/index.js'

import { createApp } from 'vue'
import pinia from './stores'
import Scrollactive from 'vue-scrollactive'
import App from './App.vue'
import router from './router'
//导入vant
import Vant, { Lazyload } from 'vant'
// 在main.css之前引入，后面需要去覆盖vant
import 'vant/lib/index.css'
import './styles/main.scss'
//引入icon图标
import 'virtual:svg-icons-register'
// 调用百度地图api
import BaiduMap from 'vue-baidu-map-3x'
//使用socket.io
// import { io } from 'socket.io-client'
// const socket = io('https://server-domain.com')
// const socket = io()
// socket.on('connect', () => {
//   console.log(socket.connected) // true
// })

// socket.on('disconnect', () => {
//   console.log(socket.connected) // false
// })
// import BaiduMapOffline from 'vue-baidu-map-offline'
const app = createApp(App)
// app.use(BaiduMapOffline, {
//   offline: true
// })
app.use(BaiduMap, {
  // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
  ak: 'nACo9VCHRK94hzb2CLMfi6v6AyXiF0Ex',
  v: '3.0' // 默认使用3.0
  // type: 'WebGL' // ||API 默认API  (使用此模式 BMap=BMapGL)
})
//注册pinia和router
app.use(pinia)
app.use(router)
app.use(Vant)
app.use(Lazyload, {
  lazyComponent: true
})
app.use(Scrollactive)
//渲染挂载组件
app.mount('#app')
